import { Node } from "cc";
import { ecs } from "db://app-game/libs/ecs/ECS";
import Simulator from "db://app-game/libs/math/rov2/Simulator";

/** 智能体组件 */
@ecs.register("AgentModel")
export class AgentModelComp extends ecs.Comp {
  id: number = -1;
  simulator: Simulator;
  /** 目标节点 */
  node: Node;
  /** 移动回调 */
  moveCallback!: Function;

  reset(entity: ecs.Entity): void {
    this.id = -1;
    this.simulator = null!;
    this.node = null!;
    this.moveCallback = null!;
  }
}
